package com.zh.controller;

import com.zh.util.dict.CodeMsg;
import com.zh.vo.Result;
import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyErrorController extends BaseController implements ErrorController {

	private static final String ERROR_PATH = "/error";

	@RequestMapping(value = ERROR_PATH)
	public Result handleError() {
		return Result.failure(CodeMsg.SERVER_ERROR);
	}

	@Override
	public String getErrorPath() {
		return ERROR_PATH;
	}
}
